Optimal. Leaf size=156 \[ -\frac {(2 a+3 b) \log (1-\sin (c+d x))}{4 (a+b)^2 d}+\frac {\log (\sin (c+d x))}{a d}-\frac {(2 a-3 b) \log (1+\sin (c+d x))}{4 (a-b)^2 d}-\frac {b^4 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right )^2 d}+\frac {1}{4 (a+b) d (1-\sin (c+d x))}+\frac {1}{4 (a-b) d (1+\sin (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 156, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2916, 12, 908}
\begin {gather*} -\frac {b^4 \log (a+b \sin (c+d x))}{a d \left (a^2-b^2\right )^2}+\frac {1}{4 d (a+b) (1-\sin (c+d x))}+\frac {1}{4 d (a-b) (\sin (c+d x)+1)}-\frac {(2 a+3 b) \log (1-\sin (c+d x))}{4 d (a+b)^2}-\frac {(2 a-3 b) \log (\sin (c+d x)+1)}{4 d (a-b)^2}+\frac {\log (\sin (c+d x))}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 908
Rule 2916
Rubi steps
\begin {align*} \int \frac {\csc (c+d x) \sec ^3(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {b^3 \text {Subst}\left (\int \frac {b}{x (a+x) \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^4 \text {Subst}\left (\int \frac {1}{x (a+x) \left (b^2-x^2\right )^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {b^4 \text {Subst}\left (\int \left (\frac {1}{4 b^3 (a+b) (b-x)^2}+\frac {2 a+3 b}{4 b^4 (a+b)^2 (b-x)}+\frac {1}{a b^4 x}-\frac {1}{a (a-b)^2 (a+b)^2 (a+x)}-\frac {1}{4 (a-b) b^3 (b+x)^2}+\frac {-2 a+3 b}{4 (a-b)^2 b^4 (b+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {(2 a+3 b) \log (1-\sin (c+d x))}{4 (a+b)^2 d}+\frac {\log (\sin (c+d x))}{a d}-\frac {(2 a-3 b) \log (1+\sin (c+d x))}{4 (a-b)^2 d}-\frac {b^4 \log (a+b \sin (c+d x))}{a \left (a^2-b^2\right )^2 d}+\frac {1}{4 (a+b) d (1-\sin (c+d x))}+\frac {1}{4 (a-b) d (1+\sin (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.46, size = 151, normalized size = 0.97 \begin {gather*} \frac {b^4 \left (-\frac {(2 a+3 b) \log (1-\sin (c+d x))}{b^4 (a+b)^2}+\frac {4 \log (\sin (c+d x))}{a b^4}-\frac {(2 a-3 b) \log (1+\sin (c+d x))}{(a-b)^2 b^4}-\frac {4 \log (a+b \sin (c+d x))}{a (a-b)^2 (a+b)^2}-\frac {1}{b^4 (a+b) (-1+\sin (c+d x))}+\frac {1}{(a-b) b^4 (1+\sin (c+d x))}\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.42, size = 137, normalized size = 0.88
method | result | size |
derivativedivides | \(\frac {\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}-\frac {b^{4} \ln \left (a +b \sin \left (d x +c \right )\right )}{a \left (a +b \right )^{2} \left (a -b \right )^{2}}+\frac {1}{\left (4 a -4 b \right ) \left (1+\sin \left (d x +c \right )\right )}+\frac {\left (-2 a +3 b \right ) \ln \left (1+\sin \left (d x +c \right )\right )}{4 \left (a -b \right )^{2}}-\frac {1}{\left (4 a +4 b \right ) \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (-2 a -3 b \right ) \ln \left (\sin \left (d x +c \right )-1\right )}{4 \left (a +b \right )^{2}}}{d}\) | \(137\) |
default | \(\frac {\frac {\ln \left (\sin \left (d x +c \right )\right )}{a}-\frac {b^{4} \ln \left (a +b \sin \left (d x +c \right )\right )}{a \left (a +b \right )^{2} \left (a -b \right )^{2}}+\frac {1}{\left (4 a -4 b \right ) \left (1+\sin \left (d x +c \right )\right )}+\frac {\left (-2 a +3 b \right ) \ln \left (1+\sin \left (d x +c \right )\right )}{4 \left (a -b \right )^{2}}-\frac {1}{\left (4 a +4 b \right ) \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (-2 a -3 b \right ) \ln \left (\sin \left (d x +c \right )-1\right )}{4 \left (a +b \right )^{2}}}{d}\) | \(137\) |
norman | \(\frac {-\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d \left (a^{2}-b^{2}\right )}-\frac {b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{2}-b^{2}\right )}+\frac {2 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (a^{2}-b^{2}\right ) d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}-\frac {\left (2 a -3 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (2 a +3 b \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d \left (a^{2}+2 a b +b^{2}\right )}-\frac {b^{4} \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}\) | \(248\) |
risch | \(\frac {i a c}{\left (a^{2}+2 a b +b^{2}\right ) d}+\frac {i \left (-2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{\left (a^{2}-b^{2}\right ) d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {2 i b^{4} x}{a \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}+\frac {i a c}{\left (a^{2}-2 a b +b^{2}\right ) d}-\frac {3 i b x}{2 \left (a^{2}-2 a b +b^{2}\right )}+\frac {2 i b^{4} c}{a d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}-\frac {2 i c}{a d}+\frac {3 i b x}{2 \left (a^{2}+2 a b +b^{2}\right )}-\frac {3 i b c}{2 \left (a^{2}-2 a b +b^{2}\right ) d}+\frac {3 i b c}{2 \left (a^{2}+2 a b +b^{2}\right ) d}-\frac {2 i x}{a}+\frac {i a x}{a^{2}+2 a b +b^{2}}+\frac {i a x}{a^{2}-2 a b +b^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a}{\left (a^{2}-2 a b +b^{2}\right ) d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) b}{2 \left (a^{2}-2 a b +b^{2}\right ) d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a}{\left (a^{2}+2 a b +b^{2}\right ) d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) b}{2 \left (a^{2}+2 a b +b^{2}\right ) d}-\frac {b^{4} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a d}\) | \(502\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 156, normalized size = 1.00 \begin {gather*} -\frac {\frac {4 \, b^{4} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{5} - 2 \, a^{3} b^{2} + a b^{4}} + \frac {{\left (2 \, a - 3 \, b\right )} \log \left (\sin \left (d x + c\right ) + 1\right )}{a^{2} - 2 \, a b + b^{2}} + \frac {{\left (2 \, a + 3 \, b\right )} \log \left (\sin \left (d x + c\right ) - 1\right )}{a^{2} + 2 \, a b + b^{2}} - \frac {2 \, {\left (b \sin \left (d x + c\right ) - a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} - a^{2} + b^{2}} - \frac {4 \, \log \left (\sin \left (d x + c\right )\right )}{a}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.69, size = 213, normalized size = 1.37 \begin {gather*} -\frac {4 \, b^{4} \cos \left (d x + c\right )^{2} \log \left (b \sin \left (d x + c\right ) + a\right ) - 2 \, a^{4} + 2 \, a^{2} b^{2} - 4 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} \log \left (-\frac {1}{2} \, \sin \left (d x + c\right )\right ) + {\left (2 \, a^{4} + a^{3} b - 4 \, a^{2} b^{2} - 3 \, a b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, a^{4} - a^{3} b - 4 \, a^{2} b^{2} + 3 \, a b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (a^{3} b - a b^{3}\right )} \sin \left (d x + c\right )}{4 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\csc {\left (c + d x \right )} \sec ^{3}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 210, normalized size = 1.35 \begin {gather*} -\frac {\frac {4 \, b^{5} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{5} b - 2 \, a^{3} b^{3} + a b^{5}} + \frac {{\left (2 \, a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a^{2} - 2 \, a b + b^{2}} + \frac {{\left (2 \, a + 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{a^{2} + 2 \, a b + b^{2}} - \frac {4 \, \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a} - \frac {2 \, {\left (a^{3} \sin \left (d x + c\right )^{2} - 2 \, a b^{2} \sin \left (d x + c\right )^{2} + a^{2} b \sin \left (d x + c\right ) - b^{3} \sin \left (d x + c\right ) - 2 \, a^{3} + 3 \, a b^{2}\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (\sin \left (d x + c\right )^{2} - 1\right )}}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 12.42, size = 170, normalized size = 1.09 \begin {gather*} \frac {\ln \left (\sin \left (c+d\,x\right )+1\right )\,\left (\frac {b}{4\,{\left (a-b\right )}^2}-\frac {1}{2\,\left (a-b\right )}\right )}{d}-\frac {\frac {a}{2\,\left (a^2-b^2\right )}-\frac {b\,\sin \left (c+d\,x\right )}{2\,\left (a^2-b^2\right )}}{d\,\left ({\sin \left (c+d\,x\right )}^2-1\right )}+\frac {\ln \left (\sin \left (c+d\,x\right )\right )}{a\,d}-\frac {\ln \left (\sin \left (c+d\,x\right )-1\right )\,\left (\frac {b}{4\,{\left (a+b\right )}^2}+\frac {1}{2\,\left (a+b\right )}\right )}{d}-\frac {b^4\,\ln \left (a+b\,\sin \left (c+d\,x\right )\right )}{a\,d\,{\left (a^2-b^2\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________